<!-- <page-header-wrapper [title]="'可开票订单'">
</page-header-wrapper>
<nz-card class="search-box" nzBordered>
    <div nz-row nzGutter="8">
        <div nz-col [nzXl]="_$expand ? 24 : 18" [nzLg]="24" [nzSm]="24" [nzXs]="24">
            <sf #sf [schema]="searchSchema"
                [ui]="{ '*': { spanLabelFixed: 100,grid: { lg: 8, md: 12, sm: 12, xs: 24 } }}" [compact]="true"
                [button]="'none'"></sf>
        </div>
        <div nz-col [nzXl]="_$expand ? 24 : 6" [nzLg]="24" [nzSm]="24" [nzXs]="24" [class.expend-options]="_$expand"
            class="text-right">
            <button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="st?.load(1)" acl [acl-ability]="['TICKET-BILLING-ORDER-search']">查询</button>
            <button nz-button (click)="resetSF()">重置</button>
            <button nz-button (click)="export()" acl [acl-ability]="['TICKET-BILLING-ORDER-exprort']"> 导出</button>
            <button nz-button nzType="link" (click)="expandToggle()">
                {{ !_$expand ? '展开' : '收起' }}
                <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i>
            </button>
        </div>
    </div>
</nz-card> -->

<nz-card class="table-box">
  <div class="header_box">
    <label class="page_title"> <label class="driver">|</label> 可开票订单</label>
    <div class="mr-sm">
      <button
        nz-button
        nzDanger
        [nzLoading]="service.http.loading"
        (click)="openDrawer()"
        acl
        [acl-ability]="['TICKET-BILLING-ORDER-search']"
        >筛选</button
      >
      <button nz-button nzDanger (click)="export()" acl [acl-ability]="['TICKET-BILLING-ORDER-exprort']">导出</button>
    </div>
  </div>
  <st
    #st
    [data]="service.$api_invoicedBillInfo_page"
    [columns]="columns"
    [req]="{ process: beforeReq }"
    [page]="{}"
    [loading]="false"
    [scroll]="{ x: '1200px', y: scrollY }"
  >
  <ng-template st-row="billCode" let-item let-index="index">
    <!-- <div>{{ item.billCode }}</div> -->
    <a *ngIf="item.resourceType == '1'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
    <a *ngIf="item.resourceType == '2'" [routerLink]="'/order-management/bulk/bulk-detail/' + item.id">{{ item.billCode }}</a>
    <a *ngIf="item.resourceType == '3'" [routerLink]="'/order-management/vehicle/vehicle-detail/' + item.id">{{ item.billCode }}</a>
    <div>
      <span>{{ item?.billStatusLabel }}</span>
    </div>
    <div>
      <span>{{ item?.billSourceLabel }}{{ item?.billSource == 1 ? item?.serviceTypeLabel : '' }} </span>
    </div>
  </ng-template>
  <ng-template st-row="mybidDetailInfo" let-item let-index="index">
    <div *ngIf="item.mybidDetailInfo.length > 0">
      <p *ngFor="let data of item.mybidDetailInfo">
        <span *ngIf="data.expenseCode !== 'FL'">{{ data.expenseName }}：{{ data.price | currency }}</span>
        <span *ngIf="data.expenseCode === 'FL'">{{ data.expenseName }}：{{ (data.price * 100).toFixed(2) + '%' }}</span>
        <span *ngIf="data.paymentStatusLabel" style="color: #f59a63">{{ data.paymentStatusLabel }}</span>
      </p>
    </div>
  </ng-template>
  <ng-template st-row="loadingTime" let-item let-index="index">
    <div *ngIf="item?.loadingTime">装 | {{ item?.loadingTime }}</div>
    <div *ngIf="item?.unloadingTime">卸 | {{ item?.unloadingTime }}</div>
  </ng-template>
  <ng-template st-row="driverName" let-item let-index="index">
    <div *ngIf="item?.driverName">司机 | {{ item?.driverName }}{{ item?.driverPhone ? "/" + item?.driverPhone : '' }}{{ item?.carNo ? "/" + item?.carNo : '' }}</div><br />
    <div *ngIf="item?.carCaptainName">车队长 | {{ item?.carCaptainName }}{{ item?.carCaptainPhone ? "/" + item?.carCaptainPhone : '' }}</div>
  </ng-template>
  <ng-template st-row="loadingPlace" let-item let-index="index">
    <div *ngIf="item?.loadingAddressArr">装 | {{ item?.loadingAddressArr }}</div>
    <div *ngIf="item?.unloadingAddressArr">卸 | {{ item?.unloadingAddressArr }}</div>
  </ng-template>
    <ng-template st-row="serviceType" let-item let-index="index">
      <span>{{ item.billTypeLabel + item.serviceTypeLabel }}</span>
    </ng-template>
  </st>
</nz-card>
